package com.carrent.demo.Service.Impl;

import com.carrent.demo.Domain.Contract;
import com.carrent.demo.Mapper.ContractMapper;
import com.carrent.demo.Service.ContractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class ContractServiceImpl implements ContractService {

    @Autowired
    ContractMapper contractMapper;

    @Override
    public List<Contract> getPage(Integer start, Integer pageSize, String name) {
        final List<Contract> page = contractMapper.getPage(start, pageSize, name);
        return page;
    }

    @Override
    public Integer getCount(String name) {
        return contractMapper.getCount(name);
    }

    @Override
    public Boolean deleteContract(String id) {
        final Boolean aBoolean = contractMapper.deleteContract(id);
        return  aBoolean;
    }

}
